The present disclosure relates to runtime analysis of computerized systems in general, and to resource management of computerized system in particular.
Computer systems typically include a hierarchy of memory devices, ranging from large, cheap, and slow to small, expensive, and fast. Many computer systems utilize a primary memory, such as a Random Access Memory (RAM), which is fast but expensive, and a secondary memory, such as a Hard Disk, which is cheap but slow. In order to make the primary memory, which is usually small, appear as being able to store larger amount of data, a paging system may be employed.
The paging system, also referred to as swapping system, designate a portion of the secondary memory, such as a partition, a region associated with a file or the like, to store a portion of the data that should be retained by the primary memory. The data may be logically grouped in a “page”. In 5-case there is not enough space in the primary region, a page may be stored in the secondary memory until it is required by the computerized device. The process of transferring the pages back and forth between hierarchy levels of the paging system is called paging, or swapping. Usage of this mechanism incurs the latency of reading or writing to the slower device, and is therefore best kept to a minimum.
The usage pattern of swapping may be determined by the mix of applications, or processes, running, their concurrency, and the amount of memory they frequently access, also referred to as a working set. If, at a given time, the sum of the working sets of the running applications is less than the amount of fast memory available, the swapping effects are minimal. However, if some applications are simultaneously trying to access working sets which sum to more than the available primary memory, the latency to the secondary memory may bottleneck the entire system. This is commonly called “thrashing”.